// JavaScript Document
$(".select_btn").css({"font-size":"14px"});
$(".select_option_box").css({"width":"auto","height":"100%","border":"1px solid #CCC","overflow":"hidden","cursor":"pointer"});
$(".select_option_default").css({"width":"auto","height":"100%","background":"","white-space":"nowrap","float":"left","overflow":"hidden"});
$(".down_btn").css({"width":"30px","height":"100%","background":"url(/platform/Platform_img/drop_417.png) no-repeat center center","float":"right","position":"relative"});
$(".select_option").css({"width":"auto","height":"auto","padding-top":"7px","padding-bottom":"10px","font-size":"12px","background":"#FDFDFD","border":"1px solid #CCC","overflow":"hidden","display":"none","position":"relative","z-index":"9999","top":"-1px"});
	
	/*$("").css({});*/
	$(".select_option_default").css({"text-indent":"5px"});
	$(".down_btn_icn").css({"width":"10px","height":"10px","background":"#0F6","position":"absolute","top":"0","left":"0","right":"0","bottom":"0","margin":"auto"});
	var soh=$(".select_option").height();
	$(".yearsli").css({"width":"100%","height":soh+"px","overflow-y":"scroll","background":"","float":"left"});
	$(".monthli").css({"width":"100%","height":soh+"px","overflow-y":"scroll","background":"","float":"left"});
	/*$(".select_option ul li").css("text-indent","5px");*/
	$(".select_btn").each(function() {
		var w=$(this).width()-35;
		var h=$(".select_btn").height();
		$(".select_option_default").each(function(){			
			$(this).css({"width":w+"px","line-height":h+"px"});	
		})		
    });
	$(".select_option_default:eq(0)").css({"width":"50px"})
	$(".select_option_default:eq(1)").css({"width":"35px"})
  	/*var ww=$("#a").width()-35;	
	alert(ww)
	$("#a").children().children().find(".select_option_default").css({"line-height":h+"px","background":"#0CC"});*/
	
	$(".m_c").click(function(){
		$(this).parent().find($(".select_option")).slideToggle();
	})
	$(".m_h").hover(function(){
		$(".select_option").slideDown();
	})
	
	$(document).bind("click",function(e){
		var target = $(e.target);
		if(target.closest(".select_btn").length == 0){//点击id为sibader之外的地方触发
			$(".select_option").hide();
		}
	})
	$(".select_btn").bind("click",function(e){
		var target = $(e.target);
		if(target.closest(".select_btn").length == 0){//点击id为sibader之外的地方触发
			$(this).children(".select_option").show();
			$(".select_option").hide();
		}	
	})
	$(".select_option ul li").click(function(){$(".select_option").hide();})
	/*var month=12;
	for(var i=1;i<=month;i++){
		$(".monthli").append("<li class='month dz'>"+i+"月</li>");
	}
	var d=new Date();
	var year=d.getFullYear();	
	for(var i=1950;i<=year;i++){
		$(".yearsli").append("<li class='years dz'>"+i+"年</li>");
	}*/
	/*var day=31;
	for(var i=1;i<=day;i++){
		$(".dayli").append("<li class='day'>"+i+"</li>");
	}*/
	/*$(".years").click(function(){
		var yt=$(this).text();
		$(".def_p").text(yt);
	})
	$(".month").click(function(){
		var mt=$(this).text();
		$(".m").text(mt);
		$(".select_option").hide();
	})
	$(".dz").css({"height":"27px","line-height":"27px","font-size":"12px"});*/